
<%--
  Created by IntelliJ IDEA.
  User: zyf
  Date: 2020/9/15
  Time: 14:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>发表新闻</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>


    <style>
        .fromtest{
            width: 500px;
            margin: 0 auto;
        }
    </style>
</head>
<body>
<form class="fromtest" action="${pageContext.request.contextPath}/news/add" method="post">

    <p style="color: red">${message}</p>
    <div class="form-group">
        <label for="exampleInputEmail1">标题</label>
        <input type="text" class="form-control" name="ntitle" id="exampleInputEmail1" >
    </div>
    <div class="input-group">
        <div class="input-group-prepend">
            <span class="input-group-text">内容</span>
        </div>
        <textarea class="form-control" name="ncontext" aria-label="With textarea"></textarea>
    </div>
    <div class="form-group">
        <label for="disabledInput">发布人</label>
        <input name="userid" value="${user.userid}" type="hidden">
        <input class="form-control" id="disabledInput" type="text"   placeholder="${user.urealname}" disabled>
    </div>
    <button type="submit" class="btn btn-primary">添加</button>
</form>
</body>
</html>
